<template>
  <section  class="component export-detail">
    <data-form :model="model" @onSearch="refreshData" :page="pageService" @handleResetForm="handleResetForm">
      <template slot="inputs">
        <el-form-item label="借据号" prop="carNo">
          <el-input v-model="model.caseNumber"></el-input>
        </el-form-item>
        <el-form-item label="客户姓名" prop="principalId">
          <el-input v-model="model.caseNumber"></el-input>
        </el-form-item>
      </template>
    </data-form>
    <data-box :data="dataSet" @onPageChange="refreshData" :page="pageService">
      <template slot="columns">
        <el-table-column label="操作" :min-width="$helper.getColumnWidth(3)">
          <template slot-scope="scope">
            <el-button @click="onClickDelete(scope.row)" type="text">删除</el-button>
          </template>
        </el-table-column>
        <el-table-column prop="batchNumber" label="借据号" :min-width="$helper.getColumnWidth(6)">
        </el-table-column>
        <el-table-column prop="principalName" label="客户姓名" :min-width="$helper.getColumnWidth(4)">
        </el-table-column>
      </template>
    </data-box>
    <div class="confirm-button">
      <el-button @click="onClickCommit">确定</el-button>
    </div>
  </section>
</template>

<script lang="ts">
import { PageService } from "~/utils/page.service";
import { Auth, Layout, Dependencies } from "~/core/decorator";
import { Vue, Component, Emit } from 'vue-property-decorator'
@Component({
  components: {}
})
export default class AddTag extends Vue {
  @Dependencies(PageService) private pageService: PageService;
  private model = {}
  private dataSet = [
    { batchNumber: 122 }
  ]

  @Emit('close') private emitClose() {}
  private refreshData() {}

  private handleResetForm() {}

  private onClickDelete(row) {}

  private onClickCommit() {
    this.emitClose()
  }
  
}
</script>